package view;

import java.awt.Graphics;
import java.awt.Image;
/**
 * Fills the screen while the data for a game loads
 * 
 * @author Sam Rang
 *
 */
@SuppressWarnings("serial")
public class SplashScreen extends ViewPanel {
    private Image myBackground;

    /**
     * 
     * @param backgroundFile String representing file location 
     * of background image
     */
    public SplashScreen(String backgroundFile) {
        myBackground = getBackground(backgroundFile);
    }

    @Override
    public void paint (Graphics g) {
        g.drawImage(myBackground, 0, 0, this.getWidth(), this.getHeight(),
                0, 0, myBackground.getWidth(null), myBackground.getHeight(null), null);
    }
}
